-- GENERATED SPELL FOR [Forged Iron Trogg] --


function spell0_27979(pUnit, Event) --@Lightning Shock,n/a--
pUnit:FullCastSpellOnTarget(50900,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27979', 2000, 1)
end

function spell1_27979(pUnit, Event) --@Lightning Shock,n/a--
pUnit:FullCastSpellOnTarget(59852,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27979', 2000, 1)
end

function Sorts_27979(pUnit, Event)
local choix_sorts_27979 = math.random(0, 1)
if choix_sorts_27979 == 0 then
pUnit:RegisterEvent('spell0_27979', 1, 1)
end
if choix_sorts_27979 == 1 then
pUnit:RegisterEvent('spell1_27979', 1, 1)
end
end

function mob27979_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27979', math.random(1500, 3000), 1)
end

function mob27979_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27979_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27979_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27979, 1, 'mob27979_Action')
RegisterUnitEvent(27979, 2, 'mob27979_Leave')
RegisterUnitEvent(27979, 3, 'mob27979_Kill')
RegisterUnitEvent(27979, 4, 'mob27979_Die')
